entry: replace gdk_draw_pixbuf() call with Cairo version
authorBenjamin Otte <otte@redhat.com>
Sun, 11 Jul 2010 22:00:07 +0000 (00:00 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 26 Jul 2010 14:42:46 +0000 (16:42 +0200)
gtk/gtkentry.c

index 046cc766edff6235e35ce78c1097f4e9768209b3..fc0cf13bd1559f14456db8a452d5aa722e55081e 100644 (file)
@@ -3209,6 +3209,7 @@ draw_icon (GtkWidget            *widget,
   EntryIconInfo *icon_info = priv->icons[icon_pos];
   GdkPixbuf *pixbuf;
   gint x, y, width, height;
+  cairo_t *cr;
 
   if (!icon_info)
     return;
@@ -3266,9 +3267,10 @@ draw_icon (GtkWidget            *widget,
       pixbuf = temp_pixbuf;
     }
 
-  gdk_draw_pixbuf (icon_info->window, widget->style->black_gc, pixbuf,
-                   0, 0, x, y, -1, -1,
-                   GDK_RGB_DITHER_NORMAL, 0, 0);
+  cr = gdk_cairo_create (icon_info->window);
+  gdk_cairo_set_source_pixbuf (cr, pixbuf, x, y);
+  cairo_paint (cr);
+  cairo_destroy (cr);
 
   g_object_unref (pixbuf);
 }